[CORE] Invert object/type_traits dependency layering#638
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the TVM FFI type traits and error-handling mechanisms to break circular dependencies and improve header organization. It introduces a low-level error_throw.h header, moves core type traits and static type keys to type_traits.h, and extracts object-dependent traits into a new object_type_traits.h header. Additionally, a TypeTraits specialization for Optional has been added. The feedback suggests explicitly including <tvm/ffi/object.h> in <tvm/ffi/object_type_traits.h> to ensure header self-containment and prevent compilation failures when it is included directly.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
5a23b88 to
e5ad134
Compare
e5ad134 to
874e131
Compare
Summary
object.hincludestype_traits.h, and move shared type metadata/helpers likeStaticTypeKey,TypeIndexToTypeKey, anddetails::type_contains_vintotype_traits.hOptionaltrait specializations into their owning headers, moveDLTensor*traits intotensor.h, and keep theuint64_toverflow-checked specialization near the end ofany.h.agents/skills/**/SKILL.mdso skill files can keep frontmatter at byte 0